import request from '@/utils/request'
export default {

    //添加小节
    addVideo(video) {
        return request({
            url: '/serviceedu/video/addVideo',
            method: 'post',
            data: video
        })
    },

    //修改小节
    updateVideo(video) {
        return request({
            url: '/serviceedu/video/updateVideo',
            method: 'post',
            data: video
        })
    },

    //根据章节id查询小节
    getVideoInfo(chapterId) {
        return request({
            url: '/serviceedu/video/getVideoInfo/' + chapterId,
            method: 'get',
        })
    },

    //删除小节同时删除视频
    deleteVideo(id) {
        return request({
            url: `/serviceedu/video/${id}`,
            method: 'delete'
        })
    },
    //单独删除阿里云中的视频
    deleteAliyunvod(id) {
        return request({
            url: `/servicevod/video/deleteAliyunvod/${id}`,
            method: 'delete'
        })
    },
}